package com.priconsumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.pojo.Customer;
import com.service.CustomerService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@CrossOrigin //(origins = {"http://localhost:8088/"})//跨域问题
@RequestMapping("/customer")
public class CustomerController {

    @Reference
    private CustomerService ctService;

    @CrossOrigin
    @RequestMapping("/customerfList")
    public List<Customer> getStaffList(){return ctService.getCustomer();}

/*    @CrossOrigin
    @PostMapping("/customerInfo")
    public Staff getStaffInfoByCode(@RequestParam(value="customerCode")String customerCode){
        return ctService.getCustomerByCode(staffCode);

    }*/
}
